#include <QtGui>
#include <QtSql>
#include "schema.h"

class CreateDoc
{

public:

CreateDoc();
~CreateDoc();
void create_doc(  QMap<QString, QString > m,
                  QString table,
                  QSqlRecord record );
QTextDocument * return_doc();
QTextDocument doc;

private:

QString add_image( QString table,
                   qint64 image_id,
                   QString side );
QString add_desc( QString table,
                  qint64 id );

QList< QMap<QString,QVariant> > add_auctions(QString table,qint64 id);
QList< QMap<QString,QVariant> > add_catalogs(QString table,qint64 id);
QList< QMap<QString,QVariant> > add_geo(QString table,qint64 id);
QList< QMap<QString,QVariant> > add_other(QString table,qint64 id);

protected:

};
